package com.starry.module.system.api.file.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

/**
 * 文件存储枚举
 *
 * @author xiaoke
 */
@Getter
public enum FileStorage {
    /**
     * 本地存储
     */
    LOCAL(1, "LOCAL"),
    /**
     * S3存储
     */
    S3(2, "S3");

    @EnumValue
    private final Integer code;

    @JsonValue // 标注该字段要开启自定义序列化返回值
    private final String name;

    FileStorage(Integer code, String name) {
        this.code = code;
        this.name = name;
    }
}
